package com.erps.CommonUtils;

public class ActionResult {

	public int Code;
	public String ctrlID;
	public String message;

	public ActionResult() {

	}

	public ActionResult(String cFieldName, String cMessage) {
		ctrlID = cFieldName;
		message = cMessage;
	}

	public static ActionResult Valid(String cMessage) {
		ActionResult vret = new ActionResult();
		vret.Code = ValueType.FAILURE;
		vret.message = cMessage;
		return vret;
	}

	public static ActionResult Valid(String cField, String cMessage) {
		ActionResult vret = new ActionResult();
		vret.Code = ValueType.VALIDATE;
		vret.message = cMessage;
		vret.ctrlID = cField;
		return vret;
	}

	public static ActionResult Valid(int iCode) {
		ActionResult vret = new ActionResult();
		vret.Code = iCode;
		return vret;
	}

}
